
#ifndef ENTITIES_H_
#define ENTITIES_H_

#include <fstream>

#include "GLMesh.h"
//#include "leak.h"

enum{
	SKYCAM_ENTITY,
	STATICMESH_ENTITY,
};

class BaseEntity : public MovableObject{
protected:
	unsigned int icon_;
public:
	BaseEntity();
	virtual ~BaseEntity(){};

	//virtual bool TraceL(const float orig[3], const float dir[3], float* dist);

	virtual void Draw();
	virtual void Export(std::string& file){};
	virtual void Import(std::ifstream& in_file){};

	virtual int class_id(){return -1;}
	virtual BaseEntity* Clone(){return new BaseEntity(*this);};
};

class SkyCamera : public BaseEntity{
public:
	SkyCamera();
	~SkyCamera();

	virtual void Export(std::string& file);
	virtual void Import(std::ifstream& in_file);

	virtual int class_id(){return SKYCAM_ENTITY;}
	virtual SkyCamera* Clone(){return new SkyCamera(*this);};
};
/*
class GLStaticMesh : public BaseEntity{
	std::string name_;
	std::shared_ptr<GLMesh> p_mesh_;

	//virtual void UpdateBBox();
public:
	std::string name(){return name_;}
	std::shared_ptr<GLMesh> p_mesh(){return p_mesh_;}

	glm::vec3 bbox_min(){return bbox_min_;}
	glm::vec3 bbox_max(){return bbox_max_;}

	void set_name(std::string name){name_ = name;};

	void LoadFromFile(std::string file_name);

	void Draw();

	//virtual bool Check(float x, float y, glm::mat4x4& view_proj_mat, MyBaseElement& element);
	virtual bool TraceL(const float orig[3], const float dir[3], float* dist);

	virtual GLStaticMesh* Clone(){return new GLStaticMesh(*this);};

	static int num_meshes;
};
*/
#endif /* ENTITIES_H_ */
